package io.simple.signals;

/**
 * Created with IntelliJ IDEA.
 * User: rehak
 * Date: 8/19/13
 * Time: 1:46 PM
 * To change this template use File | Settings | File Templates.
 */
public class Signals {

    public static int INTERNAL_SERVER_ERROR = 500;
    public static int BAD_REQUEST = 400;

    private Signals() {
        throw new IllegalStateException("Uninvokable normally!");
    }

    public static Signal newStat(int statCode, String msg) {
        return new Signal(statCode, msg);
    }

    public static Signal newStat(int statCode, String msg, Throwable cause) {
        return new Signal(statCode, msg, cause);
    }

    public static void throwStat(int statCode, String msg) throws Signal {
        throw newStat(statCode, msg);
    }

    public static void throwStat(int statCode, String msg, Throwable cause) throws Signal {
        throw newStat(statCode, msg, cause);
    }

}
